package com.security.user.mapper;

import com.security.user.model.AuditLog;
import org.apache.ibatis.annotations.*;

import com.security.user.model.UserInfo;

/**
 * @Author yanggld
 * @Date 2020/3/9-15:15
 */
public interface AuditLogMapper {

    @Select("select * from audit_log where id = #{id}")
    AuditLog getById(@Param("id") Long id);

    @Insert("insert into audit_log(method,path,username,status) values(#{method},#{path},#{username},#{status})")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int save(AuditLog auditLog);

    @Update("update audit_log set method = #{method},path=#{path},username=#{username},status=#{status} where id=#{id}")
    int update(AuditLog auditLog);
}
